package bit;

public  class 颠倒二进制位_190{
            // you need treat n as an unsigned value
            public int reverseBits(int n) {
                int res = 0;
                for(int i = 0; i < 32; i++) {
                    if(((n >> i) & 1) == 1) {
                        res += 1<< (32 - i - 1);
                    }
                }
                return res;
            }
        }
